#ifndef GLSLTEXTEDITOR_H
#define GLSLTEXTEDITOR_H

#include <QPlainTextEdit>
#include <QTextEdit>
#include <QList>

class GLSLSyntaxHighlighter;
class GLSLTextEditor : public QPlainTextEdit
{
Q_OBJECT
private:
  GLSLSyntaxHighlighter* _highlighter;

  QWidget*                _lineNumberArea;



protected:
  void resizeEvent(QResizeEvent *e);

private slots:
	void on_document_contentChanged (int position, int charsRemoved, int charsAdded);
  void UpdateLineNumberAreaWidth(int);
  void UpdateLineNumberArea(const QRect &rect, int dy);
  void HighlightCurrentLine ();

public:
	GLSLTextEditor(QWidget* parent = 0);
  int LineNumberAreaWidth ();
  void LineNumberAreaPaintEvent(QPaintEvent *event);
  void SetCursorToLine (int line);

signals:
  void ContentChanged ();
};




#endif // GLSLTEXTEDITOR_H
